1. Field of the Invention
This invention relates to the automatic assignment of task affinity to a central processing unit (CPU) having an attached vector processor (VP). More particularly, this invention relates to the giving and removing of task affinity associated with a vector processor without the knowledge or intervention of the programmer-user.
2. Prior Art
In general, an operating system, e.g. MVS, VM, running in a CPU manages multiple resources for the programmer-user. The operating system attempts to prevent user programs from utilizing a resource for any longer than is required to accomplish a given task, e.g. I/O. The operating system includes an algorithm that attempts to facilitate the management of the resources. A resource can be installed on a CPU and a task (a unit of work) can be dispatched thereon. The task, within an address space and represented by a task control block (TCB) or a service routine block (SRB), will have an affinity to the CPU that has the resource attached thereto.
An operating system includes a Supervisor Control Program (SCP) which provides the controls needed for multiprogramming, and a Dispatcher, which is a routine in the SCP, that routes control to the highest priority unit of work that is ready to execute. Dispatchable units of work are represented by task control blocks (TCB) and service request blocks (SRB). The operating system further includes a job Scheduler which requests jobs from a job entry subsystem (JES) that manages the flow of jobs (tasks), a Job/Step Timer (JST) which reports the amount of time a task uses a resource and detects the non-utilization of a resource overtime. The JST is invoked by the Dispatcher as long as the CPU timer is not damaged. A System Resource Manager (SRM) controls access to system resources. For example, SRM decides which address spaces to swap in or out and when to swap them in or out. A Memory Switch notifies the Dispatcher to switch to another address space or to start searching for work in a particular address space.
A tightly-coupled multiprocessing configuration consist of many hardware components which the operating system regards as resources. "Reconfiguration" is the process of changing the configuration of these hardware components. It involves varying system resources on-line or off-line as well as changing some control switches on the CPU's configuration control panel to establish the corresponding physical configuration.
Elements of the MVS operating system which utilizes the above features are discussed, for example, in IBM Publication GC28-0984-1 (File No. S370-34) which is entitled OS/VS2 MVS Overview and which is incorporated herein by reference.
The operating system can also provide for the dispatching of work to tightly-coupled CPUs in a central electronic complex (CEC). This is the fundamental concept of affinity work dispatching and has been implemented, for example, in those instances in which a user requires a CEC to execute programs written for a different data processing system. The CEC, or emulating system, accepts the same data, executes the same programs, and achieves the same results as the different (emulated) data processing system. The emulator, required to successfully execute the user's programs written for the emulated data processing system, is asymmetrically installed on perhaps several processors in a multi-processor (MP) environment. A user program (or task) dispatched on a CPU which has the emulator installed is assigned to the CPU by way of a program properties table (PPT) which is maintained by the system programmer and not by the user-programmer. This means that the only way to prevent work (requiring use of the emulator) from being dispatched to the CPU (having the emulator attached) is for the system programmer to change entries in the PPT in order to disconnect the emulator from the CPU on which it is installed. Use of the PPT is too restrictive and cumbersome for most users because task affinity cannot be dynamically removed (and recreated), as each unit of work is dispatched, to take advantage of the possible change in the (on-line, off-line or separate) status of the emulator, i.e. a resource, in the CEC. A CEC consists of from one to N CPUs each of which is approximately equal in execution rate.
Task affinity to the CPU having the emulator installed can only be determined (but not removed or created) by examining the CPU affinity indicator field ASCBAFFN. This indicator field is in the address space control block (ASCB) which contains the task's address space dispatching priority. CPU affinity indications in the ASCB are propagated to a TCB as it is created. The address space control block is located in the system queue area in the common area allocated from the top of virtual (main) storage.
Hitachi has a computer system that can include an integrated array processor (IAP) which can only be used if the user directly requests its use by specifying the IAP in job control language (JCL) statements. In other words, the user has to specify that vector instructions are to be used. Programmers, therefore, are required to know the system configuration and, in particular, which CPU has an IAP on-line at the time that their job will be run.
It is therefore an object of this invention to automatically assign task affinity to a CPU having an attached resource without system programmer or user-programmer intervention and knowledge of a change in affinity requirements, i.e. when vector instructions are to be used.
A further object of the invention is to avoid use of the program properties table to support usage of the resource so that the user-operator is not forced to select the CPU on which the task will be run.
An object of this invention is to manage the dynamic assignment and removal of affinity internally by the operating system at the task level.
Another object of this invention is to dynamically remove affinity following a significant period of time has elapsed during which the resource is not used.
It is an object of this invention to manage the assignment of CPU affinity for vector programs by an operating system control program at the task level without creation of new externals or usage of the program properties table.
Another object of this invention is to decrease dispatching overhead.
An object of this invention is to efficiently manage VPs so that any task requiring the use of a VP will be assigned only to a CPU having a VP attached thereto.
A further object of this invention is to obtain improved thruput by preventing CPUs without VPs attached from being idle when non-vector tasks are to be run.